home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Processes
/
Process.cp
next >
Wrap
Text File
|
2000-06-23
|
747b
|
43 lines
// Process.cp
#ifndef Process_h
#include "Process.h"
#endif
#ifndef ProcessError_h
#include "ProcessError.h"
#endif
Process::Process( ApplicationProcess )
{
ThrowProcessError( GetCurrentProcess( &psn ) );
}
Process::Process( FrontProcess )
{
ThrowProcessError( GetFrontProcess( &psn ) );
}
const Process& Process::Application()
{
static Process theApplication( application );
return theApplication;
}
bool Process::operator==( const Process& r ) const
{
Boolean result;
ThrowProcessError( SameProcess( &psn, &r.psn, &result ) );
return result;
}
void Process::Wake() const
{
ThrowProcessError( WakeUpProcess( &psn ) );
}
void Process::MoveToFront() const
{
ThrowProcessError( SetFrontProcess( &psn ) );
}